import { _decorator, Component, Node, Sprite, v2, RigidBody2D, ERigidBody2DType, Vec2, BoxCollider2D } from 'cc';
import ResourceManager from '../runTime/resourceManager';
import { TILE_TYPE_ENUM } from '../enums';
import { createUINode } from '../../utils';
import { TileManager } from '../../base/tileManager';
const { ccclass, property } = _decorator;

@ccclass('BackGround')
export class BackGround extends Component {
    async init() {
        const spriteFrame = await ResourceManager.Instance.load("backGround/bg1/spriteFrame")
        const tileManager = this.addComponent(TileManager);
        tileManager.init(TILE_TYPE_ENUM.BACK_GROUND, spriteFrame)
        tileManager.uiTransformChange(2000, 3008, Sprite.Type.TILED);
     }
}
